//
//  BLUIImageView.swift
//  yiplayer
//
//  Created by wkun on 2024/6/6.
//

import UIKit

class BLUIImageView: UIImageView {

    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */
}

extension UIImageView {
    func setImg(_ name: String?){
        if let n = name {
            self.image = UIImage(named: n) ?? UIImage()
        }
    }
}

extension UIImage {
    func getImage(_ name: String?) -> UIImage {
        return UIImage(named: name ?? "") ?? UIImage()
    }
}
